#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main()
{
	int h = 0, l = 0;
	for (h = 1; h <= 9; h++)
	{
		for (l = 1; l <= h; l++)
		{
			printf("%d*%d=%-2d  ", l,h, h * l);
		}

		printf("\n");
	}
	printf("\n-----------------------------------------------------------------------------\n\n");

	int n = 0;
	scanf("%d", &n);
	printf("\n");
	for (h = 1; h <= n; h++)
	{
		for (l = 1; l <= h; l++)
		{
			printf("%d*%d=%-2d  ", l, h, h * l);
		}

		printf("\n");
	}



	return 0;
}